package com.example.yls.demoa;

import android.animation.TypeEvaluator;
import com.example.yls.demoa.point;


/**
 * Created by yls on 2019/5/8.
 */

public class PointEvaluator implements TypeEvaluator<point> {
    @Override
    public point evaluate(float fraction, point startValue, point endValue) {
            int x = (int) (startValue.getX()+fraction*(endValue.getX()-startValue.getX()));
            int y= (int) (startValue.getY()+fraction*(endValue.getY()-startValue.getY()));
            point point=new point(x,y);
        return point;
    }
}
